package com.yd.mvc.mobile.dicController;

import com.yd.app.service.common.LoggerService;
import com.yd.app.service.pc.dicService.DicService;
import com.yd.domain.sys.Dic;
import com.yd.mvc.baseController.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zy
 * @create 2018-03-07 17:40
 * @desc
 **/
@RestController
@RequestMapping(value = "/mapi/mdic")
public class MDicController extends BaseController{
    @Autowired
    private DicService dicService;
    @Autowired
    private LoggerService loggerService;
    /**
     * @Author: zy
     * @Desc: 根据类型获取数据字典
     * @Date:  2018/3/8
     */
    @RequestMapping(value = "/getDicCacheByType/{dicType}",method = RequestMethod.GET)
    public List<Dic> getDicCacheByType(@PathVariable("dicType") String dicType){
        List<Dic> list =new ArrayList<>();
        list=dicService.getDicCacheByType(dicType);
        return list;
    }
}
